package classexercise;

public class Cylinder extends Circle{

        private double height=1.0;
        public Cylinder(double  radius){
        	  super(radius);
        }
        public Cylinder(double  radius,double height){
      	  super(radius);
      	  this.setHeight(height);
      }
        public Cylinder(double  radius,double height,String color){
      	  super(radius,color);
      	  this.setHeight(height);
      }
		public double getHeight() {
			return height;
		}
		public void setHeight(double height) {
			this.height = height;
		}
	    public double getVolume(){
	    	 double volume = Math.PI*(this.getRaidus()*this.getRaidus())*height;
	    	 return volume;
	    }
}
